package com.glsc.ngateway.common.api.platform.dto.other;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.glsc.ngateway.common.api.common.enums.DictConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @Author: libj
 * @Date: 2022/6/27
 * @Desc: 数字证书信息Dto
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
@EqualsAndHashCode(callSuper=false)
public class DigitalKeyRemindLeaderDto {
    //一级部门领导
    private String leaderLevelOneDepartment;
    //二级部门领导
    private String leaderLevelTwoDepartment;

    @ApiModelProperty(value = "发证机构")
    protected String keyIssueBranch;

    @ApiModelProperty(value = "对应平台")
    protected String keyPlatform;

    @ApiModelProperty(value = "证书有效期 格式：yyyy-MM-dd")
    protected String keyExpireDate;

    @ApiModelProperty(value = "使用部门")
    protected String useDepartment;

    @ApiModelProperty(value = "托管人所在部门名称")
    protected String custodianDeptName;

    @ApiModelProperty(value = "托管人所在部门id")
    protected String custodianDeptId;

    @ApiModelProperty(value = "用途")
    protected String useDesc;

    @ApiModelProperty(value = "证书序列号")
    protected String keyNo;

    @ApiModelProperty(value = "备注")
    protected String remark;

    @ApiModelProperty(value = "状态 是否在用 字典： am_digital_key_status")
    protected String keyStatus;

    @ApiModelProperty(value = "是否已经提醒，字典 yesno （N=未提醒(默认) Y=已提醒)")
    protected String hasRemind = DictConstant.NO;

    @ApiModelProperty(value = "删除状态，字典 字典 yesno （N=否(默认) Y=是)")
    protected String keyDeleted = DictConstant.NO;

    @ApiModelProperty(value = "创建时间 yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime createTime;

    @ApiModelProperty(value = "创建人ID")
    protected String createOperator;

    @ApiModelProperty(value = "创建人姓名")
    protected String createOperatorName;

    //操作人员信息
    @ApiModelProperty(value = "操作来源")
    protected String opSource;

    @ApiModelProperty(value = "操作动作(增加、修改)")
    protected String opAction;

    @ApiModelProperty(value = "操作人员ID")
    protected String opOperator;

    @ApiModelProperty(value = "操作人员姓名")
    protected String opOperatorName;

    @ApiModelProperty(value = "操作时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime opTime;

    @ApiModelProperty(value = "数字证书ID")
    private Integer keyId;
}

